<!DOCTYPE html> 


<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>
  
    RFC 5761 - Multiplexing RTP Data and Control Packets on a Single Port
  
</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>

  @media only screen 
    and (min-width: 992px)
    and (max-width: 1199px) {
      body { font-size: 14pt; }
            div.content { width: 96ex; margin: 0 auto; }
        }
  @media only screen 
    and (min-width: 768px)
    and (max-width: 991px) {
            body { font-size: 14pt; }
            div.content { width: 96ex; margin: 0 auto; }
        }
  @media only screen 
    and (min-width: 480px)
    and (max-width: 767px) {
            body { font-size: 11pt; }
            div.content { width: 96ex; margin: 0 auto; }
        }
  @media only screen 
    and (max-width: 479px) {
            body { font-size: 8pt; }
            div.content { width: 96ex; margin: 0 auto; }
        }
  @media only screen 
    and (min-device-width : 375px) 
    and (max-device-width : 667px) {
            body { font-size: 9.5pt; }
            div.content { width: 96ex; margin: 0; }
        }
  @media only screen 
    and (min-device-width: 1200px) {
            body { font-size: 10pt; margin: 0 4em; }
            div.content { width: 96ex; margin: 0; }
        }
        h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
      font-weight: bold;
            /* line-height: 0pt; */
            display: inline;
            white-space: pre;
            font-family: monospace;
            font-size: 1em;
      font-weight: bold;
        }
        pre {
            font-size: 1em;
            margin-top: 0px;
            margin-bottom: 0px;
        }
  .pre {
      white-space: pre;
      font-family: monospace;
  }
  .header{
      font-weight: bold;
  }
        .newpage {
            page-break-before: always;
        }
        .invisible {
            text-decoration: none;
            color: white;
        }
        @media print {
            body {
                margin-top: 5em;
                font-family: monospace;
                font-size: 10.5pt;
            }
            h1, h2, h3, h4, h5, h6 {
                font-size: 1em;
            }
        
            a:link, a:visited {
                color: inherit;
                text-decoration: none;
            }
            .noprint {
                display: none;
            }
        }
  @media screen {
      .grey, .grey a:link, .grey a:visited {
    color: #777;
      }
            .meta-info {
                background-color: #EEE;
            }
            .top {
                border-top: 7px solid #EEE;
            }
            .pad {
                padding-top: 7px;
                line-height: 24px;
                padding-bottom: 4px;
            }
            .bgwhite  { background-color: white; }
            .bgred    { background-color: #F44; }
            .bggrey   { background-color: #666; }
            .bgbrown  { background-color: #840; }            
            .bgorange { background-color: #FA0; }
            .bgyellow { background-color: #EE0; }
            .bgmagenta{ background-color: #F4F; }
            .bgblue   { background-color: #66F; }
            .bgcyan   { background-color: #4DD; }
            .bggreen  { background-color: #4F4; }

            .legend   { font-size: 90%; }
            .cplate   { font-size: 70%; border: solid grey 1px; }
  }
    
     

.bgwhite  { background-color: white; }
.bgred    { background-color: #F44; }
.bggrey   { background-color: #666; }
.bgbrown  { background-color: #840; }            
.bgorange { background-color: #FA0; }
.bgyellow { background-color: #EE0; }
.bgmagenta{ background-color: #F4F; }
.bgblue   { background-color: #66F; }
.bgcyan   { background-color: #4DD; }
.bggreen  { background-color: #4F4; }

.draftcontent { margin-top:0px !important;}


    </style>

    
  <link rel="alternate" type="application/atom+xml" title="Document changes" href="/feed/document-changes/draft-ietf-avt-rtp-and-rtcp-mux/">
  <meta name="description" content="Multiplexing RTP Data and Control Packets on a Single Port (RFC )">


    
    <link rel="shortcut icon" href="https://www.ietf.org/lib/dt/7.46.0/ietf/images/ietf-icon-blue3.png">
    
    <link rel="apple-touch-icon" href="https://www.ietf.org/lib/dt/7.46.0/ietf/images/apple-touch-icon.png">
  </head>

  <body style="padding-top: 0;">

	  <div class="content" id="content">
        
  
 
  <div class="rfcmarkup">
    <div class="noprint" style="height: 6px;">
      <div onmouseover="this.style.cursor='pointer';"
         onclick="showLegend();"
         onmouseout="hideLegend()"
         style="height: 6px; min-height: 6px; width: 96ex; position: absolute; margin-top:0; "
         class="meta-info bgblue"
         title="Click for colour legend." >&nbsp;</div>
      <div id="legend"
           class="meta-info noprint pre legend"
           style="position:absolute; top: 4px; left: 4ex; visibility:hidden; background-color: white; padding: 4px 9px 5px 7px; border: solid #345 1px; "
           onmouseover="showLegend();"
           onmouseout="hideLegend();">
      </div>
    </div>

    
      <div class="noprint">
	 <pre class="pre meta-info">[<a href="https://datatracker.ietf.org" title="Document search and retrieval page">Search</a>] [<a href="https://www.rfc-editor.org/rfc/rfc5761.txt" title="Plaintext version of this document">txt</a>|<a href="https://www.rfc-editor.org/rfc/rfc5761.html" title="HTML version of this document, from XML2RFC">html</a>|<a href="https://www.rfc-editor.org/rfc/pdfrfc/rfc5761.txt.pdf" title="PDF version of this document">pdf</a>|<a href="https://www.rfc-editor.org/rfc/inline-errata/rfc5761.html">with errata</a>|<a href="/doc/rfc5761/bibtex/" title="BibTex entry for this document">bibtex</a>] [<a href="/doc/rfc5761/" title="Datatracker information for this document">Tracker</a>] [<a href="/group/avt/" title="The working group handling this document">WG</a>] [<a href="mailto:draft-ietf-avt-rtp-and-rtcp-mux@ietf.org?subject=draft-ietf-avt-rtp-and-rtcp-mux" title="Send email to the document authors">Email</a>] [<a href="https://www.ietf.org/rfcdiff?difftype=--hwdiff&url2=draft-ietf-avt-rtp-and-rtcp-mux-07.txt" title="Inline diff (wdiff)">Diff1</a>] [<a href="https://www.ietf.org/rfcdiff?url2=draft-ietf-avt-rtp-and-rtcp-mux-07.txt" title="Side-by-side diff">Diff2</a>] [<a href="https://www.ietf.org/tools/idnits?url=https://www.ietf.org/archive/id/draft-ietf-avt-rtp-and-rtcp-mux-07.txt" title="Run an idnits check of this document">Nits</a>]

From: <a href="/doc/html/draft-ietf-avt-rtp-and-rtcp-mux-07">draft-ietf-avt-rtp-and-rtcp-mux-07</a>               Proposed Standard
Updated by: <a href="/doc/html/rfc8035">8035</a>, <a href="/doc/html/rfc8858">8858</a>                                      <a class="text-warning" href="https://www.rfc-editor.org/errata_search.php?rfc=5761&amp;rec_status=0">Errata exist</a></pre>
      </div>
    

    <div class="draftcontent">
    <pre>Internet Engineering Task Force (IETF)                        C. Perkins
Request for Comments: 5761                         University of Glasgow
Updates: <a href="/doc/html/rfc3550">3550</a>, <a href="/doc/html/rfc3551">3551</a>                                        M. Westerlund
Category: Standards Track                                       Ericsson
ISSN: 2070-1721                                               April 2010


       <span class="h1">Multiplexing RTP Data and Control Packets on a Single Port</span>

Abstract

   This memo discusses issues that arise when multiplexing RTP data
   packets and RTP Control Protocol (RTCP) packets on a single UDP port.
   It updates <a href="/doc/html/rfc3550">RFC 3550</a> and <a href="/doc/html/rfc3551">RFC 3551</a> to describe when such multiplexing
   is and is not appropriate, and it explains how the Session
   Description Protocol (SDP) can be used to signal multiplexed
   sessions.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in <a href="/doc/html/rfc5741#section-2">Section&nbsp;2 of RFC 5741</a>.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   <a href="https://www.rfc-editor.org/info/rfc5761">http://www.rfc-editor.org/info/rfc5761</a>.

Copyright Notice

   Copyright (c) 2010 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to <a href="/doc/html/bcp78">BCP 78</a> and the IETF Trust&#x27;s Legal
   Provisions Relating to IETF Documents
   (<a href="https://trustee.ietf.org/license-info">http://trustee.ietf.org/license-info</a>) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.





<span class="grey">Perkins &amp; Westerlund         Standards Track                    [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="/doc/html/rfc5761">RFC 5761</a>                Multiplexing RTP and RTCP             April 2010</span>


   This document may contain material from IETF Documents or IETF
   Contributions published or made publicly available before November
   10, 2008.  The person(s) controlling the copyright in some of this
   material may not have granted the IETF Trust the right to allow
   modifications of such material outside the IETF Standards Process.
   Without obtaining an adequate license from the person(s) controlling
   the copyright in such materials, this document may not be modified
   outside the IETF Standards Process, and derivative works of it may
   not be created outside the IETF Standards Process, except to format
   it for publication as an RFC or to translate it into languages other
   than English.

Table of Contents

   <a href="#section-1">1</a>. Introduction ....................................................<a href="#page-3">3</a>
   <a href="#section-2">2</a>. Background ......................................................<a href="#page-3">3</a>
   <a href="#section-3">3</a>. Terminology .....................................................<a href="#page-4">4</a>
   <a href="#section-4">4</a>. Distinguishable RTP and RTCP Packets ............................<a href="#page-4">4</a>
   <a href="#section-5">5</a>. Multiplexing RTP and RTCP on a Single Port ......................<a href="#page-6">6</a>
      <a href="#section-5.1">5.1</a>. Unicast Sessions ...........................................<a href="#page-6">6</a>
           <a href="#section-5.1.1">5.1.1</a>. SDP Signalling ......................................<a href="#page-6">6</a>
           <a href="#section-5.1.2">5.1.2</a>. Interactions with SIP Forking .......................<a href="#page-7">7</a>
           <a href="#section-5.1.3">5.1.3</a>. Interactions with ICE ...............................<a href="#page-7">7</a>
           <a href="#section-5.1.4">5.1.4</a>. Interactions with Header Compression ................<a href="#page-8">8</a>
      <a href="#section-5.2">5.2</a>. Any Source Multicast Sessions ..............................<a href="#page-9">9</a>
      <a href="#section-5.3">5.3</a>. Source-Specific Multicast Sessions .........................<a href="#page-9">9</a>
   <a href="#section-6">6</a>. Multiplexing, Bandwidth, and Quality of Service ................<a href="#page-10">10</a>
   <a href="#section-7">7</a>. Security Considerations ........................................<a href="#page-10">10</a>
   <a href="#section-8">8</a>. IANA Considerations ............................................<a href="#page-11">11</a>
   <a href="#section-9">9</a>. Acknowledgements ...............................................<a href="#page-11">11</a>
   <a href="#section-10">10</a>. References ....................................................<a href="#page-11">11</a>
      <a href="#section-10.1">10.1</a>. Normative References .....................................<a href="#page-11">11</a>
      <a href="#section-10.2">10.2</a>. Informative References ...................................<a href="#page-12">12</a>


















<span class="grey">Perkins &amp; Westerlund         Standards Track                    [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="/doc/html/rfc5761">RFC 5761</a>                Multiplexing RTP and RTCP             April 2010</span>


<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>.  Introduction</span>

   The Real-time Transport Protocol (RTP) [<a href="#ref-1" title="&quot;RTP: A Transport Protocol for Real-Time Applications&quot;">1</a>] comprises two components:
   a data transfer protocol and an associated control protocol (RTCP).
   Historically, RTP and RTCP have been run on separate UDP ports.  With
   increased use of Network Address Port Translation (NAPT) [<a href="#ref-14" title="&quot;Traditional IP Network Address Translator (Traditional NAT)&quot;">14</a>], this
   has become problematic, since maintaining multiple NAT bindings can
   be costly.  It also complicates firewall administration, since
   multiple ports must be opened to allow RTP traffic.  This memo
   discusses how the RTP and RTCP flows for a single media type can be
   run on a single port, to ease NAT traversal and simplify firewall
   administration, and considers when such multiplexing is appropriate.
   The multiplexing of several types of media (e.g., audio and video)
   onto a single port is not considered here (but see Section 5.2 of
   [<a href="#ref-1" title="&quot;RTP: A Transport Protocol for Real-Time Applications&quot;">1</a>]).

   This memo is structured as follows: in <a href="#section-2">Section 2</a> we discuss the
   design choices that led to the use of separate ports and comment on
   the applicability of those choices to current network environments.
   We discuss terminology in <a href="#section-3">Section 3</a> and how to distinguish
   multiplexed packets in <a href="#section-4">Section 4</a>; we then specify when and how RTP
   and RTCP should be multiplexed, and how to signal multiplexed
   sessions, in <a href="#section-5">Section 5</a>.  Quality of service and bandwidth issues are
   discussed in <a href="#section-6">Section 6</a>.  We conclude with security considerations in
   <a href="#section-7">Section 7</a> and IANA considerations in <a href="#section-8">Section 8</a>.

   This memo updates Section 11 of [<a href="#ref-1" title="&quot;RTP: A Transport Protocol for Real-Time Applications&quot;">1</a>].

<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>.  Background</span>

   An RTP session comprises data packets and periodic control (RTCP)
   packets.  RTCP packets are assumed to use &quot;the same distribution
   mechanism as the data packets&quot;, and the &quot;underlying protocol MUST
   provide multiplexing of the data and control packets, for example
   using separate port numbers with UDP&quot; [<a href="#ref-1" title="&quot;RTP: A Transport Protocol for Real-Time Applications&quot;">1</a>].  Multiplexing was deferred
   to the underlying transport protocol, rather than being provided
   within RTP, for the following reasons:

   1.  Simplicity: an RTP implementation is simplified by moving the RTP
       and RTCP demultiplexing to the transport layer, since it need not
       concern itself with the separation of data and control packets.
       This allows the implementation to be structured in a very natural
       fashion, with a clean separation of data and control planes.








<span class="grey">Perkins &amp; Westerlund         Standards Track                    [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="/doc/html/rfc5761">RFC 5761</a>                Multiplexing RTP and RTCP             April 2010</span>


   2.  Efficiency: following the principle of integrated layer
       processing [<a href="#ref-15" title="&quot;Architectural Considerations for a New Generation of Protocols&quot;">15</a>], an implementation will be more efficient when
       demultiplexing happens in a single place (e.g., according to UDP
       port) than when split across multiple layers of the stack (e.g.,
       according to UDP port and then according to packet type).

   3.  To enable third-party monitors: while unicast voice-over-IP has
       always been considered, RTP was also designed to support loosely
       coupled multicast conferences [<a href="#ref-16" title="&quot;First IETF Internet Audiocast&quot;">16</a>] and very large-scale multicast
       streaming media applications (such as the so-called triple-play
       IP television (IPTV) service).  Accordingly, the design of RTP
       allows the RTCP packets to be multicast using a separate IP
       multicast group and UDP port to the data packets.  This not only
       allows participants in a session to get reception-quality
       feedback but also enables deployment of third-party monitors,
       which listen to reception quality without access to the data
       packets.  This was intended to provide manageability of multicast
       sessions, without compromising privacy.

   While these design choices are appropriate for many uses of RTP, they
   are problematic in some cases.  There are many RTP deployments that
   don&#x27;t use IP multicast, and with the increased use of Network Address
   Translation (NAT) the simplicity of multiplexing at the transport
   layer has become a liability, since it requires complex signalling to
   open multiple NAT pinholes.  In environments such as these, it is
   desirable to provide an alternative to demultiplexing RTP and RTCP
   using separate UDP ports, instead using only a single UDP port and
   demultiplexing within the application.

   This memo provides such an alternative by multiplexing RTP and RTCP
   packets on a single UDP port, distinguished by the RTP payload type
   and RTCP packet type values.  This pushes some additional work onto
   the RTP implementation, in exchange for simplified NAT traversal.

<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>.  Terminology</span>

   The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL NOT&quot;,
   &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;, &quot;MAY&quot;, and &quot;OPTIONAL&quot; in this
   document are to be interpreted as described in <a href="/doc/html/rfc2119">RFC 2119</a> [<a href="#ref-2" title="&quot;Key words for use in RFCs to Indicate Requirement Levels&quot;">2</a>].

<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>.  Distinguishable RTP and RTCP Packets</span>

   When RTP and RTCP packets are multiplexed onto a single port, the
   RTCP packet type field occupies the same position in the packet as
   the combination of the RTP marker (M) bit and the RTP payload type
   (PT).  This field can be used to distinguish RTP and RTCP packets
   when two restrictions are observed: 1) the RTP payload type values
   used are distinct from the RTCP packet types used; and 2) for each



<span class="grey">Perkins &amp; Westerlund         Standards Track                    [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="/doc/html/rfc5761">RFC 5761</a>                Multiplexing RTP and RTCP             April 2010</span>


   RTP payload type (PT), PT+128 is distinct from the RTCP packet types
   used.  The first constraint precludes a direct conflict between RTP
   payload type and RTCP packet type; the second constraint precludes a
   conflict between an RTP data packet with the marker bit set and an
   RTCP packet.

   The following conflicts between RTP and RTCP packet types are known:

   o  RTP payload types 64-65 conflict with the (obsolete) RTCP FIR and
      NACK packets defined in the original &quot;RTP Payload Format for H.261
      Video Streams&quot; [<a href="#ref-3" title="&quot;RTP Payload Format for H.261 Video Streams&quot;">3</a>] (which was obsoleted by [<a href="#ref-17" title="&quot;RTP Payload Format for H.261 Video Streams&quot;">17</a>]).

   o  RTP payload types 72-76 conflict with the RTCP SR, RR, SDES, BYE,
      and APP packets defined in the RTP specification [<a href="#ref-1" title="&quot;RTP: A Transport Protocol for Real-Time Applications&quot;">1</a>].

   o  RTP payload types 77-78 conflict with the RTCP RTPFB and PSFB
      packets defined in the RTP/AVPF profile [<a href="#ref-4" title="&quot;Extended RTP Profile for Real-time Transport Control Protocol (RTCP)-Based Feedback (RTP/AVPF)&quot;">4</a>].

   o  RTP payload type 79 conflicts with RTCP Extended Report (XR) [<a href="#ref-5" title="&quot;RTP Control Protocol Extended Reports (RTCP XR)&quot;">5</a>]
      packets.

   o  RTP payload type 80 conflicts with Receiver Summary Information
      (RSI) packets defined in &quot;RTCP Extensions for Single-Source
      Multicast Sessions with Unicast Feedback&quot; [<a href="#ref-6" title="&quot;RTP Control Protocol (RTCP) Extensions for Single-Source Multicast Sessions with Unicast Feedback&quot;">6</a>].

   New RTCP packet types may be registered in the future and will
   further reduce the RTP payload types that are available when
   multiplexing RTP and RTCP onto a single port.  To allow this
   multiplexing, future RTCP packet type assignments SHOULD be made
   after the current assignments in the range 209-223, then in the range
   194-199, so that only the RTP payload types in the range 64-95 are
   blocked.  RTCP packet types in the ranges 1-191 and 224-254 SHOULD
   only be used when other values have been exhausted.

   Given these constraints, it is RECOMMENDED to follow the guidelines
   in the RTP/AVP profile [<a href="#ref-7" title="&quot;RTP Profile for Audio and Video Conferences with Minimal Control&quot;">7</a>] for the choice of RTP payload type values,
   with the additional restriction that payload type values in the range
   64-95 MUST NOT be used.  Specifically, dynamic RTP payload types
   SHOULD be chosen in the range 96-127 where possible.  Values below 64
   MAY be used if that is insufficient, in which case it is RECOMMENDED
   that payload type numbers that are not statically assigned by [<a href="#ref-7" title="&quot;RTP Profile for Audio and Video Conferences with Minimal Control&quot;">7</a>] be
   used first.

      Note: Since Section 6.1 of [<a href="#ref-1" title="&quot;RTP: A Transport Protocol for Real-Time Applications&quot;">1</a>] specifies that all RTCP packets
      MUST be sent as compound packets beginning with a Sender Report
      (SR) or a Receiver Report (RR) packet, one might wonder why RTP





<span class="grey">Perkins &amp; Westerlund         Standards Track                    [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="/doc/html/rfc5761">RFC 5761</a>                Multiplexing RTP and RTCP             April 2010</span>


      payload types other than 72 and 73 are prohibited when
      multiplexing RTP and RTCP.  This is done to support [<a href="#ref-18" title="&quot;Support for Reduced-Size Real-Time Transport Control Protocol (RTCP): Opportunities and Consequences&quot;">18</a>], which
      allows the use of non-compound RTCP packets in some circumstances.

<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>.  Multiplexing RTP and RTCP on a Single Port</span>

   The procedures for multiplexing RTP and RTCP on a single port depend
   on whether the session is a unicast session or a multicast session.
   For multicast sessions, the procedures also depend on whether Any
   Source Multicast (ASM) or Source-Specific Multicast (SSM) is to be
   used.

<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>.  Unicast Sessions</span>

   It is acceptable to multiplex RTP and RTCP packets on a single UDP
   port to ease NAT traversal for unicast sessions, provided the RTP
   payload types used in the session are chosen according to the rules
   in <a href="#section-4">Section 4</a>, and provided that multiplexing is signalled in advance.
   The following sections describe how such multiplexed sessions can be
   signalled using the Session Initiation Protocol (SIP) with the offer/
   answer model.

<span class="h4"><a class="selflink" id="section-5.1.1" href="#section-5.1.1">5.1.1</a>.  SDP Signalling</span>

   When the Session Description Protocol (SDP) [<a href="#ref-8" title="&quot;SDP: Session Description Protocol&quot;">8</a>] is used to negotiate
   RTP sessions following the offer/answer model [<a href="#ref-9" title="&quot;An Offer/Answer Model with Session Description Protocol (SDP)&quot;">9</a>], the &quot;a=rtcp-mux&quot;
   attribute (see <a href="#section-8">Section 8</a>) indicates the desire to multiplex RTP and
   RTCP onto a single port.  The initial SDP offer MUST include this
   attribute at the media level to request multiplexing of RTP and RTCP
   on a single port.  For example:

       v=0
       o=csp 1153134164 1153134164 IN IP6 2001:DB8::211:24ff:fea3:7a2e
       s=-
       c=IN IP6 2001:DB8::211:24ff:fea3:7a2e
       t=1153134164 1153137764
       m=audio 49170 RTP/AVP 97
       a=rtpmap:97 iLBC/8000
       a=rtcp-mux

   This offer denotes a unicast voice-over-IP session using the RTP/AVP
   profile with iLBC coding.  The answerer is requested to send both RTP
   and RTCP to port 49170 on IPv6 address 2001:DB8::211:24ff:fea3:7a2e.

   If the answerer wishes to multiplex RTP and RTCP onto a single port,
   it MUST include a media-level &quot;a=rtcp-mux&quot; attribute in the answer.
   The RTP payload types used in the answer MUST conform to the rules in
   <a href="#section-4">Section 4</a>.



<span class="grey">Perkins &amp; Westerlund         Standards Track                    [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="/doc/html/rfc5761">RFC 5761</a>                Multiplexing RTP and RTCP             April 2010</span>


   If the answer does not contain an &quot;a=rtcp-mux&quot; attribute, the offerer
   MUST NOT multiplex RTP and RTCP packets on a single port.  Instead,
   it should send and receive RTCP on a port allocated according to the
   usual port-selection rules (either the port pair, or a signalled port
   if the &quot;a=rtcp:&quot; attribute [<a href="#ref-10" title="&quot;Real Time Control Protocol (RTCP) attribute in Session Description Protocol (SDP)&quot;">10</a>] is also included).  This will occur
   when talking to a peer that does not understand the &quot;a=rtcp-mux&quot;
   attribute.

   When SDP is used in a declarative manner, the presence of an &quot;a=rtcp-
   mux&quot; attribute signals that the sender will multiplex RTP and RTCP on
   the same port.  The receiver MUST be prepared to receive RTCP packets
   on the RTP port, and any resource reservation needs to be made
   including the RTCP bandwidth.

<span class="h4"><a class="selflink" id="section-5.1.2" href="#section-5.1.2">5.1.2</a>.  Interactions with SIP Forking</span>

   When using SIP with a forking proxy, it is possible that an INVITE
   request may result in multiple 200 (OK) responses.  If RTP and RTCP
   multiplexing is offered in that INVITE, it is important to be aware
   that some answerers may support multiplexed RTP and RTCP, some not.
   This will require the offerer to listen for RTCP on both the RTP port
   and the usual RTCP port, and to send RTCP on both ports, unless
   branches of the call that support multiplexing are re-negotiated to
   use separate RTP and RTCP ports.

<span class="h4"><a class="selflink" id="section-5.1.3" href="#section-5.1.3">5.1.3</a>.  Interactions with ICE</span>

   It is common to use the Interactive Connectivity Establishment (ICE)
   [<a href="#ref-19" title="&quot;Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal for Offer/Answer Protocols&quot;">19</a>] methodology to establish RTP sessions in the presence of Network
   Address Translation (NAT) devices or other middleboxes.  If RTP and
   RTCP are sent on separate ports, the RTP media stream comprises two
   components in ICE (one for RTP and one for RTCP), with connectivity
   checks being performed for each component.  If RTP and RTCP are to be
   multiplexed on the same port some of these connectivity checks can be
   avoided, reducing the overhead of ICE.

   If it is desired to use both ICE and multiplexed RTP and RTCP, the
   initial offer MUST contain an &quot;a=rtcp-mux&quot; attribute to indicate that
   RTP and RTCP multiplexing is desired and MUST contain &quot;a=candidate:&quot;
   lines for both RTP and RTCP along with an &quot;a=rtcp:&quot; line indicating a
   fallback port for RTCP in the case that the answerer does not support
   RTP and RTCP multiplexing.  This MUST be done for each media where
   RTP and RTCP multiplexing is desired.

   If the answerer wishes to multiplex RTP and RTCP on a single port, it
   MUST generate an answer containing an &quot;a=rtcp-mux&quot; attribute and a
   single &quot;a=candidate:&quot; line corresponding to the RTP port (i.e., there
   is no candidate for RTCP) for each media where it is desired to use



<span class="grey">Perkins &amp; Westerlund         Standards Track                    [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="/doc/html/rfc5761">RFC 5761</a>                Multiplexing RTP and RTCP             April 2010</span>


   RTP and RTCP multiplexing.  The answerer then performs connectivity
   checks for that media as if the offer had contained only a single
   candidate for RTP.  If the answerer does not want to multiplex RTP
   and RTCP on a single port, it MUST NOT include the &quot;a=rtcp-mux&quot;
   attribute in its answer and MUST perform connectivity checks for all
   offered candidates in the usual manner.

   On receipt of the answer, the offerer looks for the presence of the
   &quot;a=rtcp-mux&quot; line for each media where multiplexing was offered.  If
   this is present, then connectivity checks proceed as if only a single
   candidate (for RTP) were offered, and multiplexing is used once the
   session is established.  If the &quot;a=rtcp-mux&quot; line is not present, the
   session proceeds with connectivity checks using both RTP and RTCP
   candidates, eventually leading to a session being established with
   RTP and RTCP on separate ports (as signalled by the &quot;a=rtcp:&quot;
   attribute).

<span class="h4"><a class="selflink" id="section-5.1.4" href="#section-5.1.4">5.1.4</a>.  Interactions with Header Compression</span>

   Multiplexing RTP and RTCP packets onto a single port may negatively
   impact header compression schemes, for example, Compressed RTP (CRTP)
   [<a href="#ref-20" title="&quot;Compressing IP/UDP/RTP Headers for Low-Speed Serial Links&quot;">20</a>] and RObust Header Compression (ROHC) [<a href="#ref-21" title="&quot;RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed&quot;">21</a>] [<a href="#ref-22" title="&quot;The RObust Header Compression (ROHC) Framework&quot;">22</a>].  Header
   compression exploits patterns of change in the RTP headers of
   consecutive packets to send an indication that the packet changed in
   the expected way, rather than sending the complete header each time.
   This can lead to significant bandwidth savings if flows have uniform
   behaviour.

   The presence of RTCP packets multiplexed with RTP data packets can
   disrupt the patterns of change between headers and has the potential
   to significantly reduce header compression efficiency.  The extent of
   this disruption depends on the header compression algorithm used and
   on the way flows are classified.  A well-designed classifier should
   be able to separate RTP and RTCP multiplexed on the same port into
   different compression contexts, using the payload type field, such
   that the effect on the compression ratio is small.  A classifier that
   assigns compression contexts based only on the IP addresses and UDP
   ports will not perform well.  It is expected that implementations of
   header compression will need to be updated to efficiently support RTP
   and RTCP multiplexed on the same port.

   This effect of multiplexing RTP and RTCP on header compression may be
   especially significant in those environments, such as some wireless
   telephony systems, that rely on the efficiency of header compression
   to match the media to a limited-capacity channel.  The implications
   of multiplexing RTP and RTCP should be carefully considered before
   use in such environments.




<span class="grey">Perkins &amp; Westerlund         Standards Track                    [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="/doc/html/rfc5761">RFC 5761</a>                Multiplexing RTP and RTCP             April 2010</span>


<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>.  Any Source Multicast Sessions</span>

   The problem of NAT traversal is less severe for Any Source Multicast
   (ASM) RTP sessions than for unicast RTP sessions, and the benefit of
   using separate ports for RTP and RTCP is greater due to the ability
   to support third-party RTCP-only monitors.  Accordingly, RTP and RTCP
   packets SHOULD NOT be multiplexed onto a single port when using ASM
   RTP sessions and SHOULD instead use separate ports and multicast
   groups.

<span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>.  Source-Specific Multicast Sessions</span>

   RTP sessions running over Source-Specific Multicast (SSM) send RTCP
   packets from the source to receivers via the multicast channel, but
   use a separate unicast feedback mechanism [<a href="#ref-6" title="&quot;RTP Control Protocol (RTCP) Extensions for Single-Source Multicast Sessions with Unicast Feedback&quot;">6</a>] to send RTCP from the
   receivers back to the source, with the source either reflecting the
   RTCP packets to the group or sending aggregate summary reports.

   Following the terminology of [<a href="#ref-6" title="&quot;RTP Control Protocol (RTCP) Extensions for Single-Source Multicast Sessions with Unicast Feedback&quot;">6</a>], we identify three RTP/RTCP flows in
   an SSM session:

   1.  RTP and RTCP flows between media sender and distribution source.
       In many scenarios, the media sender and distribution source are
       co-located, so multiplexing is not a concern.  If the media
       sender and distribution source are connected by a unicast
       connection, the rules in <a href="#section-5.1">Section 5.1</a> of this memo apply to that
       connection.  If the media sender and distribution source are
       connected by an Any Source Multicast connection, the rules in
       <a href="#section-5.2">Section 5.2</a> apply to that connection.  If the media sender and
       distribution source are connected by a Source-Specific Multicast
       connection, the RTP and RTCP packets MAY be multiplexed on a
       single port, provided this is signalled (using &quot;a=rtcp-mux&quot; if
       using SDP).

   2.  RTP and RTCP sent from the distribution source to the receivers.
       The distribution source MAY multiplex RTP and RTCP onto a single
       port to ease NAT traversal issues on the forward SSM path,
       although doing so may hinder third-party monitoring devices if
       the session uses the simple feedback model.  When using SDP, the
       multiplexing SHOULD be signalled using the &quot;a=rtcp-mux&quot;
       attribute.

   3.  RTCP sent from receivers to distribution source.  This is an
       RTCP-only path, so multiplexing is not a concern.

   Multiplexing RTP and RTCP packets on a single port in an SSM session
   has the potential for interactions with header compression described
   in <a href="#section-5.1.4">Section 5.1.4</a>.



<span class="grey">Perkins &amp; Westerlund         Standards Track                    [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="/doc/html/rfc5761">RFC 5761</a>                Multiplexing RTP and RTCP             April 2010</span>


<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>.  Multiplexing, Bandwidth, and Quality of Service</span>

   Multiplexing RTP and RTCP has implications on the use of the Quality
   of Service (QoS) mechanism that handles flow that are determined by a
   three or five tuple (protocol, port, and address for source and/or
   destination).  In these cases, the RTCP flow will be merged with the
   RTP flow when multiplexing them together.  Thus, the RTCP bandwidth
   requirement needs to be considered when doing QoS reservations for
   the combined RTP and RTCP flow.  However, from an RTCP perspective it
   is beneficial to receive the same treatment of RTCP packets as for
   RTP as it provides more accurate statistics for the measurements
   performed by RTCP.

   The bandwidth required for a multiplexed stream comprises the session
   bandwidth of the RTP stream plus the bandwidth used by RTCP.  In the
   usual case, the RTP session bandwidth is signalled in the SDP &quot;b=AS:&quot;
   (or &quot;b=TIAS:&quot; [<a href="#ref-11" title="&quot;A Transport Independent Bandwidth Modifier for the Session Description Protocol (SDP)&quot;">11</a>]) line, and the RTCP traffic is limited to 5% of
   this value.  Any QoS reservation SHOULD therefore be made for 105% of
   the &quot;b=AS:&quot; value.  If a non-standard RTCP bandwidth fraction is
   used, signalled by the SDP &quot;b=RR:&quot; and/or &quot;b=RS:&quot; lines [<a href="#ref-12" title="&quot;Session Description Protocol (SDP) Bandwidth Modifiers for RTP Control Protocol (RTCP) Bandwidth&quot;">12</a>], then
   any QoS reservation SHOULD be made for bandwidth equal to (AS + RS +
   RR), taking the RS and RR values from the SDP answer.

<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>.  Security Considerations</span>

   The usage of multiplexing RTP and RTCP is not believed to introduce
   any new security considerations.  Known major issues are the
   integrity and authentication of the signalling used to set up the
   multiplexing as well as the integrity, authentication, and
   confidentiality of the actual RTP and RTCP traffic.  The security
   considerations in the RTP specification [<a href="#ref-1" title="&quot;RTP: A Transport Protocol for Real-Time Applications&quot;">1</a>] and any applicable RTP
   profile (e.g., [<a href="#ref-7" title="&quot;RTP Profile for Audio and Video Conferences with Minimal Control&quot;">7</a>]) and payload format(s) apply.

   If the Secure Real-time Transport Protocol (SRTP) [<a href="#ref-13" title="&quot;The Secure Real-time Transport Protocol (SRTP)&quot;">13</a>] is to be used
   in conjunction with multiplexed RTP and RTCP, then multiplexing MUST
   be done below the SRTP layer.  The sender generates SRTP and SRTCP
   packets in the usual manner, based on their separate cryptographic
   contexts, and multiplexes them onto a single port immediately before
   transmission.  At the receiver, the cryptographic context is derived
   from the synchronization source (SSRC), destination network address,
   and destination transport port number in the usual manner, augmented
   using the RTP payload type and RTCP packet type to demultiplex SRTP
   and SRTCP according to the rules in <a href="#section-4">Section 4</a> of this memo.  After
   the SRTP and SRTCP packets have been demultiplexed, cryptographic
   processing happens in the usual manner.






<span class="grey">Perkins &amp; Westerlund         Standards Track                   [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="/doc/html/rfc5761">RFC 5761</a>                Multiplexing RTP and RTCP             April 2010</span>


<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>.  IANA Considerations</span>

   Following the guidelines in [<a href="#ref-8" title="&quot;SDP: Session Description Protocol&quot;">8</a>], the IANA has registered one new SDP
   attribute:

   o  Contact name/email: authors of <a href="/doc/html/rfc5761">RFC 5761</a>

   o  Attribute name: rtcp-mux

   o  Long-form attribute name: RTP and RTCP multiplexed on one port

   o  Type of attribute: media level

   o  Subject to charset: no

   This attribute is used to signal that RTP and RTCP traffic should be
   multiplexed on a single port (see <a href="#section-5">Section 5</a> of this memo).  It is a
   property attribute, which does not take a value.

   The rules for assignment of RTP RTCP Control Packet Types in the RTP
   Parameters registry are updated as follows.  When assigning RTP RTCP
   Control Packet types, IANA is requested to assign unused values from
   the range 200-223 where possible.  If that range is fully occupied,
   values from the range 194-199 may be used, and then values from the
   ranges 1-191 and 224-254.  This improves header validity checking of
   RTCP packets compared to RTP packets or other unrelated packets.  The
   values 0 and 255 are avoided for improved validity checking relative
   to random packets since all-zeros and all-ones are common values.

<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>.  Acknowledgements</span>

   We wish to thank Steve Casner, Joerg Ott, Christer Holmberg, Gunnar
   Hellstrom, Randell Jesup, Hadriel Kaplan, Harikishan Desineni,
   Stephan Wenger, Jonathan Rosenberg, Roni Even, Ingemar Johansson,
   Dave Singer, Kevin Johns, and David Black for their comments on this
   memo.  This work was supported in part by the UK Engineering and
   Physical Sciences Research Council.

<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>.  References</span>

<span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a>.  Normative References</span>

   [<a id="ref-1">1</a>]   Schulzrinne, H., Casner, S., Frederick, R., and V. Jacobson,
         &quot;RTP: A Transport Protocol for Real-Time Applications&quot;, STD 64,
         <a href="/doc/html/rfc3550">RFC 3550</a>, July 2003.

   [<a id="ref-2">2</a>]   Bradner, S., &quot;Key words for use in RFCs to Indicate Requirement
         Levels&quot;, <a href="/doc/html/bcp14">BCP 14</a>, <a href="/doc/html/rfc2119">RFC 2119</a>, March 1997.



<span class="grey">Perkins &amp; Westerlund         Standards Track                   [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="/doc/html/rfc5761">RFC 5761</a>                Multiplexing RTP and RTCP             April 2010</span>


   [<a id="ref-3">3</a>]   Turletti, T., &quot;RTP Payload Format for H.261 Video Streams&quot;,
         <a href="/doc/html/rfc2032">RFC 2032</a>, October 1996.

   [<a id="ref-4">4</a>]   Ott, J., Wenger, S., Sato, N., Burmeister, C., and J. Rey,
         &quot;Extended RTP Profile for Real-time Transport Control Protocol
         (RTCP)-Based Feedback (RTP/AVPF)&quot;, <a href="/doc/html/rfc4585">RFC 4585</a>, July 2006.

   [<a id="ref-5">5</a>]   Friedman, T., Caceres, R., and A. Clark, &quot;RTP Control Protocol
         Extended Reports (RTCP XR)&quot;, <a href="/doc/html/rfc3611">RFC 3611</a>, November 2003.

   [<a id="ref-6">6</a>]   Ott, J., Chesterfield, J., and E. Schooler, &quot;RTP Control
         Protocol (RTCP) Extensions for Single-Source Multicast Sessions
         with Unicast Feedback&quot;, <a href="/doc/html/rfc5760">RFC 5760</a>, February 2010.

   [<a id="ref-7">7</a>]   Schulzrinne, H. and S. Casner, &quot;RTP Profile for Audio and Video
         Conferences with Minimal Control&quot;, STD 65, <a href="/doc/html/rfc3551">RFC 3551</a>, July 2003.

   [<a id="ref-8">8</a>]   Handley, M., Jacobson, V., and C. Perkins, &quot;SDP: Session
         Description Protocol&quot;, <a href="/doc/html/rfc4566">RFC 4566</a>, July 2006.

   [<a id="ref-9">9</a>]   Rosenberg, J. and H. Schulzrinne, &quot;An Offer/Answer Model with
         Session Description Protocol (SDP)&quot;, <a href="/doc/html/rfc3264">RFC 3264</a>, June 2002.

   [<a id="ref-10">10</a>]  Huitema, C., &quot;Real Time Control Protocol (RTCP) attribute in
         Session Description Protocol (SDP)&quot;, <a href="/doc/html/rfc3605">RFC 3605</a>, October 2003.

   [<a id="ref-11">11</a>]  Westerlund, M., &quot;A Transport Independent Bandwidth Modifier for
         the Session Description Protocol (SDP)&quot;, <a href="/doc/html/rfc3890">RFC 3890</a>,
         September 2004.

   [<a id="ref-12">12</a>]  Casner, S., &quot;Session Description Protocol (SDP) Bandwidth
         Modifiers for RTP Control Protocol (RTCP) Bandwidth&quot;, <a href="/doc/html/rfc3556">RFC 3556</a>,
         July 2003.

   [<a id="ref-13">13</a>]  Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K.
         Norrman, &quot;The Secure Real-time Transport Protocol (SRTP)&quot;,
         <a href="/doc/html/rfc3711">RFC 3711</a>, March 2004.

<span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a>.  Informative References</span>

   [<a id="ref-14">14</a>]  Srisuresh, P. and K. Egevang, &quot;Traditional IP Network Address
         Translator (Traditional NAT)&quot;, <a href="/doc/html/rfc3022">RFC 3022</a>, January 2001.

   [<a id="ref-15">15</a>]  Clark, D. and D. Tennenhouse, &quot;Architectural Considerations for
         a New Generation of Protocols&quot;, Proceedings of ACM
         SIGCOMM 1990, September 1990.





<span class="grey">Perkins &amp; Westerlund         Standards Track                   [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="/doc/html/rfc5761">RFC 5761</a>                Multiplexing RTP and RTCP             April 2010</span>


   [<a id="ref-16">16</a>]  Casner, S. and S. Deering, &quot;First IETF Internet Audiocast&quot;, ACM
         SIGCOMM Computer Communication Review, Volume 22, Number 3,
         July 1992.

   [<a id="ref-17">17</a>]  Even, R., &quot;RTP Payload Format for H.261 Video Streams&quot;,
         <a href="/doc/html/rfc4587">RFC 4587</a>, August 2006.

   [<a id="ref-18">18</a>]  Johansson, I. and M. Westerlund, &quot;Support for Reduced-Size
         Real-Time Transport Control Protocol (RTCP): Opportunities and
         Consequences&quot;, <a href="/doc/html/rfc5506">RFC 5506</a>, April 2009.

   [<a id="ref-19">19</a>]  Rosenberg, J., &quot;Interactive Connectivity Establishment (ICE): A
         Protocol for Network Address Translator (NAT) Traversal for
         Offer/Answer Protocols&quot;, <a href="/doc/html/rfc5245">RFC 5245</a>, April 2010.

   [<a id="ref-20">20</a>]  Casner, S. and V. Jacobson, &quot;Compressing IP/UDP/RTP Headers for
         Low-Speed Serial Links&quot;, <a href="/doc/html/rfc2508">RFC 2508</a>, February 1999.

   [<a id="ref-21">21</a>]  Bormann, C., Burmeister, C., Degermark, M., Fukushima, H.,
         Hannu, H., Jonsson, L-E., Hakenberg, R., Koren, T., Le, K.,
         Liu, Z., Martensson, A., Miyazaki, A., Svanbro, K., Wiebke, T.,
         Yoshimura, T., and H. Zheng, &quot;RObust Header Compression (ROHC):
         Framework and four profiles: RTP, UDP, ESP, and uncompressed&quot;,
         <a href="/doc/html/rfc3095">RFC 3095</a>, July 2001.

   [<a id="ref-22">22</a>]  Sandlund, K., Pelletier, G., and L-E. Jonsson, &quot;The RObust
         Header Compression (ROHC) Framework&quot;, <a href="/doc/html/rfc5795">RFC 5795</a>, March 2010.

Authors&#x27; Addresses

   Colin Perkins
   University of Glasgow
   Department of Computing Science
   Glasgow  G12 8QQ
   UK

   EMail: csp@csperkins.org


   Magnus Westerlund
   Ericsson
   Farogatan 6
   Stockholm  SE-164 80
   Sweden

   EMail: magnus.westerlund@ericsson.com





Perkins &amp; Westerlund         Standards Track                   [Page 13]
</pre>
    </div>

  </div>


        
	  </div>

	

	

    </div>

      
    <script type="text/javascript"><!--
    var legend_html = "Colour legend:<br /> \
     <table> \
        <tr><td>Unknown:</td>                   <td><span class='cplate bgwhite'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Draft:</td>                     <td><span class='cplate bgred'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Informational:</td>             <td><span class='cplate bgorange'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Experimental:</td>              <td><span class='cplate bgyellow'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Best Common Practice:</td>      <td><span class='cplate bgmagenta'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Proposed Standard:</td>         <td><span class='cplate bgblue'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Draft Standard (old designation):</td> <td><span class='cplate bgcyan'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Internet Standard:</td>         <td><span class='cplate bggreen'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Historic:</td>                  <td><span class='cplate bggrey'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
        <tr><td>Obsolete:</td>                  <td><span class='cplate bgbrown'>&nbsp;&nbsp;&nbsp;&nbsp;</span></td></tr> \
    </table>";
    function showLegend() {
        var elem = document.getElementById('legend');
        elem.innerHTML = legend_html
        elem.style.visibility='visible';
    }
    function hideLegend() {
        var elem = document.getElementById('legend');
        elem.style.visibility='hidden';
        elem.innerHTML = "";
    }
    // -->
    </script>

  </body>
</html>